// /*
//  * @Descripttion:
//  * @version:
//  * @Author: ChenXiang
//  * @Date: 2021-04-08 17:18:03
//  * @LastEditors: ChenXiang
//  * @LastEditTime: 2021-04-16 10:04:08
//  */

// import AsyncComponent from "./component/asyncComponent";

// import test from "@/module/test/router";

// const routes = [
//   {
//     path: "/",
//     exact: true,
//     component: AsyncComponent(() =>
//       import(/* webpackChunkName: "Home" */ "@/module/test/pages/home")
//     ),
//     requiresAuth: false,
//   },
//   // ...test,
//   // {
//   //   path: "/test",
//   //   exact: true,
//   //   component: AsyncComponent(() =>
//   //     import(/* webpackChunkName: "Home" */ "@/module/test/page/index")
//   //   ),
//   //   requiresAuth: false,
//   //   children: [
//   //     // {
//   //     //   path: "/test/son",
//   //     //   component: Son,
//   //     //   requiresAuth: false, //需要登陆后才能跳转的页面
//   //     // },
//   //     {
//   //       path: "/test/empty",
//   //       component: EmptyHolder,
//   //       requiresAuth: false, //需要登陆后才能跳转的页面
//   //     },
//   //   ],
//   // },
//   // {
//   //   path: "/test/son",
//   //   exact: true,
//   //   component: Son,
//   // },
//   {
//     path: "/login",
//     component: AsyncComponent(() =>
//       import(/* webpackChunkName: "Home" */ "@/module/test/pages/child")
//     ),
//     requiresAuth: false,
//     children: [
//       {
//         path: "/login/son",
//         component: AsyncComponent(() =>
//           import(/* webpackChunkName: "Home" */ "@/module/test/pages/son")
//         ),
//         exact: false,
//         requiresAuth: false, //需要登陆后才能跳转的页面
//       },
//     ],
//   },
//   // {
//   //   path: "/login/brother",
//   //   exact: true,
//   //   component: brother,
//   //   requiresAuth: false, //需要登陆后才能跳转的页面
//   // },
//   // {
//   //   path: "/user",
//   //   component: User,
//   //   requiresAuth: false, //需要登陆后才能跳转的页面
//   // },
//   // {
//   //   path: "*",
//   //   component: NotFound,
//   //   requiresAuth: false,
//   // },
// ];

import loadable from "./component/loadable";
import AsyncComponent from "./component/asyncComponent";
import NotFound from "@/module/error/404";
import routeTest from "@/module/routeTest/router";
import componentTest from "@/module/componentsTest/router";
import keepAlive from "@/module/keepAlive/router";
import reduxTest from "@/module/reduxTest/router";
import specialEffect from "@/module/specialEffect/router";

import sourceCode from "@/module/sourceCode/router";
import uiTest from "@/module/ui/router";
import uiH5Test from "@/module/uiH5/router";
import componentsRoute from "./components-route";
import hocsRoute from "./hocs-route";

const routes = [
  {
    path: "/",
    exact: true,
    component: AsyncComponent(() =>
      import(
        /* webpackChunkName: "Home" */ "@/module/app"
      )
    ),
    requiresAuth: false
  },

  {
    path: "/login",
    component: AsyncComponent(() =>
      import(/* webpackChunkName: "Home" */ "@/module/view/pages/login")
    ),
    requiresAuth: false,
  },
  ...uiTest,
  ...routeTest,
  ...componentTest,
  ...keepAlive,
  ...reduxTest,
  ...uiH5Test,
  ...sourceCode,
  ...specialEffect,
  ...componentsRoute,
  ...hocsRoute,
  {
    path: "*",
    component: NotFound,
    requiresAuth: false,
  },
];

export default routes;
